package concurrent;

/**
 * @author sjw
 * @className t
 * @date 2022/4/15 15:15
 * @description: TODO
 */
public class t {

    public static void main(String[] args) {

        Thread t1=new Thread(new Runnable() {
            @Override
            public void run() {
                while (true){
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    System.out.println("子线程。。。");
                }
            }
        });

        //t1.setDaemon(true);
        t1.start();

        for(int i=0; i<10; i++){
            try {
                Thread.sleep(200);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("main ....");
        }


    }
}
